#ifndef MP3FILE_H
#define MP3FILE_H

#include<QtCore>
#include<QStandardItem>
#include<QUrl>

class Mp3File
{
public:
    Mp3File(QString name, const QUrl& url, bool downloaded = false, int host = hostingTypeDirect);
    Mp3File(const QStandardItem& item);

    QStandardItem* toQStandardItem() const;

    static const int nameRole = Qt::DisplayRole;
    static const int urlRole = Qt::UserRole + 1;
    static const int downloadedRole = Qt::UserRole + 2;
    static const int hostingTypeRole = Qt::UserRole + 3;

    static const int hostingTypeDirect = 0;
    static const int hostingTypeZippyshare = 1;


    QString getName() const {return _name;};
    QUrl getUrl() const {return _url;};
    bool getDownloaded() const {return _downloaded;};
    void setDownloaded(bool downloaded){_downloaded = downloaded;};
    int getHost() const {return _host;};

private:
    QString _name;
    QUrl _url;
    bool _downloaded;
    int _host;
};



#endif // MP3FILE_H
